package org.anachronos.jeep.agent.test.stub;

import javax.transaction.HeuristicMixedException;
import javax.transaction.HeuristicRollbackException;
import javax.transaction.NotSupportedException;
import javax.transaction.RollbackException;
import javax.transaction.Status;
import javax.transaction.SystemException;

public class UserTransactionStub implements javax.transaction.UserTransaction {
	private int status;
	
	public void begin() throws NotSupportedException, SystemException {
	}

	public void commit() throws HeuristicMixedException,
			HeuristicRollbackException, IllegalStateException,
			RollbackException, SecurityException, SystemException {
		status = Status.STATUS_COMMITTED;
	}

	public int getStatus() throws SystemException {
		return status;
	}

	public void rollback() throws IllegalStateException, SecurityException,
			SystemException {
		status = Status.STATUS_ROLLEDBACK;
	}

	public void setRollbackOnly() throws IllegalStateException, SystemException {
	}

	public void setTransactionTimeout(int arg0) throws SystemException {
	}
}
